package com.wnhz.work.yz.activity;

import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.wnhz.work.yz.BaseActivity;
import com.wnhz.work.yz.R;
import com.wnhz.work.yz.base.BaseRVAdapter;
import com.wnhz.work.yz.base.BaseViewHolder;
import com.wnhz.work.yz.utils.DisplayUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * 名下会员
 */
public class HeelerUserActivity extends BaseActivity implements View.OnClickListener {

    private List<HeelerUserMolder> list = new ArrayList<>();
    private BaseRVAdapter<HeelerUserMolder> adapter;

    private RecyclerView recyclerView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_heeler_user);

        TextView title = (TextView) findViewById(R.id.view_main_middle_title);
        title.setText("名下会员");
        findViewById(R.id.btn_main_left).setOnClickListener(this);

        list.add(new HeelerUserMolder());
        recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
        recyclerView.setLayoutManager(new GridLayoutManager(this,2));
        int padd = DisplayUtil.dp2px(this,6);
        recyclerView.setPadding(padd,0,padd,0);
        adapter = new BaseRVAdapter<HeelerUserMolder>(this,list) {
            @Override
            public int getLayoutId(int viewType) {
                return R.layout.item_heeleruser;
            }

            @Override
            public void onBind(BaseViewHolder holder, int position) {

            }
        };
        recyclerView.setAdapter(adapter);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_main_left:
                finish();
                break;
        }
    }

    private class HeelerUserMolder{

    }
}
